Scenario #9522: Users of a Group Can View Hosting Assets Below the Assumed Project

This scenario verifies which hosting assets are visible to a user whose JWT contains a GROUP Subject.

Properties

Required

Given

name value
nameOfGroupSubject /xyz-Service
nameOfUserSubject tst-drew_selfregistered
projectCaption D-1000111 default project

Prerequisite: Resolving the project’s UUID

In a real-world scenario, there could be multiple results and the user has to select the correct one.

HTTP GET "/api/hs/booking/projects" \
  -H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
  `# {` \
  `#   "comment" : "any user which does not even need to have any roles granted yet",` \
  `#   "sub" : "uuid<tst-drew_selfregistered>",` \
  `#   "groups" : [` \
  `#     "/xyz-Service"` \
  `#   ]` \
  `# }`
=> status: 200 OK 
[ {
  "uuid" : "d603172f-7acd-4acc-a830-5be2c7d70451", // projectUuid
  "caption" : "D-1000111 default project"
} ]

Fetch visible hosting assets via assigned group

The group ‘/xyz-Service’ has the role ‘hs_booking.project#d603172f-7acd-4acc-a830-5be2c7d70451:ADMIN’. // projectUuid The user ‘tst-drew_selfregistered’ is a member of the group ‘/xyz-Service’. Therefore, hosting assets below the booking project ‘D-1000111 default project’ are expected to be visible.

HTTP GET "/api/hs/hosting/assets?projectUuid=d603172f-7acd-4acc-a830-5be2c7d70451" // projectUuid \
  -H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
  `# {` \
  `#   "comment" : "any user which does not even need to have any roles granted yet",` \
  `#   "sub" : "uuid<tst-drew_selfregistered>",` \
  `#   "groups" : [` \
  `#     "/xyz-Service"` \
  `#   ]` \
  `# }` \
  -H 'Hostsharing-Assumed-Roles: hs_booking.project#d603172f-7acd-4acc-a830-5be2c7d70451:ADMIN' // projectUuid
=> status: 200 OK 
[ {
  "uuid" : "be3e1b94-0ffb-4c31-9884-93f4dbd79aeb",
  "type" : "MANAGED_WEBSPACE",
  "identifier" : "fir01",
  "caption" : "some Webspace",
  "alarmContact" : null,
  "config" : { }
}, {
  "uuid" : "3758dbcd-a771-4de6-b6ef-6596f2185fa6",
  "type" : "MANAGED_SERVER",
  "identifier" : "vm1011",
  "caption" : "some ManagedServer",
  "alarmContact" : null,
  "config" : {
    "monit_max_ram_usage" : 80,
    "monit_max_ssd_usage" : 70,
    "monit_max_cpu_usage" : 90
  }
} ]

generated on 2026-08-10 03:08:28 for branch HEAD